Skip to content

Conversation

@jonathanc-n
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

Throw coercion error for LIKE adjacent operations. This matches DuckDB behaviour, just makes it clearer to users that nested types are not supported for this comparison.

Remove the list_coercion for LIKE comparisons

Are these changes tested?

SLT tests.

@github-actions github-actions bot added logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt) labels Feb 7, 2026
INSERT INTO t0(v0, v2) VALUES (123, true);

query error There isn't a common type to coerce .* in .* expression
SELECT true FROM t0 WHERE ((REGEXP_MATCH(t0.v1, t0.v1)) NOT LIKE (REGEXP_MATCH(t0.v1, t0.v1, 'jH')));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would these be easier to read by replacing the second regexp_match with just an array literal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good point, i made the changes for the others but kept this specific line:

SELECT true FROM t0 WHERE ((REGEXP_MATCH(t0.v1, t0.v1)) NOT LIKE (REGEXP_MATCH(t0.v1, t0.v1, 'jH')));

To just show replication of the query in the issue

@neilconway
Copy link
Contributor

Thanks for taking this on -- lgtm!

@Jefffrey Jefffrey added this pull request to the merge queue Feb 10, 2026
Merged via the queue into apache:main with commit 6a2bfd4 Feb 10, 2026
32 checks passed
@Jefffrey
Copy link
Contributor

Thanks @jonathanc-n & @neilconway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LIKE fails on nested value

3 participants